<?php

	//$admin = '/'.Configure::read('Routing.admin');

	// Controller routing.
	Router::connect('/users', array('plugin'=>'pippoacl', 'controller' => 'users', 'action' => 'index'));
	Router::connect('/roles', array('plugin'=>'pippoacl', 'controller' => 'roles', 'action' => 'index'));
	
	//Router::connect('/roles/*', array('plugin'=>'pippoacl', 'controller' => 'roles'));
	// Admin routing
	//Router::connect($admin.'/users/view/*', array('plugin'=>'user', 'controller' => 'users', 'admin' => true, 'action' => 'edit'));
	//Router::connect($admin.'/users/edit/*', array('plugin'=>'pippoacl', 'controller' => 'users', 'admin' => true, 'action' => 'edit'));
	//Router::connect($admin.'/users/*', array('plugin'=>'pippoacl', 'controller' => 'users', 'admin' => true));
	//Router::connect($admin.'/users/groups', array('plugin'=>'pippoacl', 'controller' => 'groups', 'admin' => true));
	//Router::connect($admin.'/users/permissions', array('plugin'=>'pippoacl', 'controller' => 'permissions', 'admin' => true));

	// User routes
	Router::connect('/login', array('plugin' => 'pippoacl', 'controller' => 'users', 'action' => 'login'));
	Router::connect('/logout', array('plugin' => 'pippoacl', 'controller' => 'users', 'action' => 'logout'));
	Router::connect('/forget', array('plugin' => 'pippoacl', 'controller' => 'users', 'action' => 'forget'));
	Router::connect('/register', array('plugin' => 'pippoacl', 'controller' => 'users', 'action' => 'register'));
	Router::connect('/activate/*', array('plugin' => 'pippoacl', 'controller' => 'users', 'action' => 'activate'));
	Router::connect('/reset/*', array('plugin' => 'pippoacl', 'controller' => 'users', 'action' => 'reset'));
	Router::connect('/users/profile', array('plugin' => 'pippoacl', 'controller' => 'users', 'action' => 'profile'));
	Router::connect('/users/login', array('plugin' => 'pippoacl', 'controller' => 'users', 'action' => 'login'));
	Router::connect('/users/index', array('plugin' => 'pippoacl', 'controller' => 'users', 'action' => 'index'));
	Router::connect('/users/register', array('plugin' => 'pippoacl', 'controller' => 'users', 'action' => 'register'));
	Router::connect('/users/switch_language', array('plugin' => 'pippoacl', 'controller' => 'users', 'action' => 'switch_language'));
	Router::connect('/users/logout', array('plugin' => 'pippoacl', 'controller' => 'users', 'action' => 'logout'));
	Router::connect('/users/forget', array('plugin' => 'pippoacl', 'controller' => 'users', 'action' => 'forget'));
	Router::connect('/users/activate/*', array('plugin' => 'pippoacl', 'controller' => 'users', 'action' => 'activate'));
	Router::connect('/users/reset/*', array('plugin' => 'pippoacl', 'controller' => 'users', 'action' => 'reset'));
	
	// Role routes
	Router::connect('/roles/index', array('plugin' => 'pippoacl', 'controller' => 'roles', 'action' => 'index'));
	Router::connect('/roles/acl', array('plugin' => 'pippoacl', 'controller' => 'roles', 'action' => 'acl'));
	Router::connect('/roles/cleanupAcl', array('plugin' => 'pippoacl', 'controller' => 'roles', 'action' => 'cleanupAcl'));
	Router::connect('/roles/adjustperm', array('plugin' => 'pippoacl', 'controller' => 'roles', 'action' => 'adjustperm'));
	Router::connect('/roles/adjustperm/*', array('plugin' => 'pippoacl', 'controller' => 'roles', 'action' => 'adjustperm'));
	Router::connect('/roles/add', array('plugin' => 'pippoacl', 'controller' => 'roles', 'action' => 'add'));
	Router::connect('/roles/edit/*', array('plugin' => 'pippoacl', 'controller' => 'roles', 'action' => 'edit'));
	Router::connect('/roles/view/*', array('plugin' => 'pippoacl', 'controller' => 'roles', 'action' => 'edit'));
	Router::connect('/roles/delete/*', array('plugin' => 'pippoacl', 'controller' => 'roles', 'action' => 'edit'));
?>